home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Metrowerks CodeWarrior / CodeWarrior Pro 4 Release Notes / PowerPlant Notes / PP 1.9.2 Notes < prev    next >
Encoding:
Text File  |  1998-08-25  |  11.0 KB  |  391 lines  |  [TEXT/CWIE]

  1. ========================================================================
  2. PowerPlant Core Classes Notes
  3. ========================================================================
  4.  
  5. Version: PowerPlant 1.9.2
  6. Date:     August 24, 1998
  7. ========================================================================
  8.  
  9. This note describes changes from PowerPlant 1.9.1, which was a
  10. post-CW Pro 3 update. Read the release notes for PP 1.9.1 for
  11. information about the changes since CW Pro 3.
  12.     
  13.  
  14. ========================================================================
  15. Changes Required for Existing Projects
  16. ========================================================================
  17.  
  18. * LCommander::AllowSwitchTarget() function removed. It's been renamed
  19.     to AllowBeTarget() to go along with the new AllowDontBeTarget()
  20.     function. AllowBeTarget() works almost the same as
  21.     AllowSwitchTarget(), and you code should work the same if you
  22.     just rename your overrides of AllowSwitchTarget() as
  23.     AllowBeTarget().
  24.     
  25. * Removed checks for color QuickDraw in UDesktop, UFloatingDesktop,
  26.     LPrintout, and UScreenPort. Everything uses color ports now.
  27.     Most other PP imaging classes assume that color Quickdraw
  28.     is present, so those checks didn't do any good.
  29.     
  30.     However, if you modified PP to work on black & white sytems,
  31.     you will need to put these checks back in yourself.
  32.     
  33. * LClock class has major changes. Old version was a stub that did
  34.     not really work. If you have LClock items in existing PPob
  35.     resources, you may want to delete and recreate them as the
  36.     clock flags field could have an invalid value.
  37.     
  38.     The definition within PowerPlant.r for LClock changed to
  39.     reflect the new clock flags. You may need to modify
  40.     Rez files that define LClock items.
  41.     
  42. * LControlImp::DoKeyPress() now returns a control part code instead
  43.     of a bool. Part code of 0 means the keypress wasn't handled,
  44.     so client code should still work (since 0 means false).
  45.     But you must change subclasses which override DoKeyPress.
  46.  
  47.  
  48. ========================================================================
  49. Source Code Changes
  50. ========================================================================
  51.  
  52. LAMControlImp
  53. -------------
  54. * SetFontStyle()
  55.     Declared ControlFontStyleRec& parameter as const
  56.     
  57. * GetFontSytle()
  58.     Declared as const
  59.     
  60. * SetKeyboardFocusPart()
  61.     New function which sets the focus within a multipart control
  62.     
  63. * BeTarget()
  64.     Don't call SetKeyboardFocus() if part is kControlFocusNoPart
  65.     
  66. * DoKeyPress()
  67.     Returns control part code instead of a bool
  68.     
  69.  
  70. LAMPopupButtonImp
  71. -----------------
  72. * Init()
  73.     Set Menu ID to MENU_Unspecified before calling inherited Init()
  74.     and restore it afterwards.
  75.  
  76.  
  77. LApplication
  78. ------------
  79. * Run()
  80.     Call ForceTargetSwitch() instead of SwitchTarget();
  81.  
  82. LAttachable
  83. -----------
  84. * GetAttachmentsList()
  85.     New inline function which returns the list of Attachments
  86.     
  87.     
  88. LClock
  89. ------
  90. * Major rewrite of the entire class. Old version was just a stub
  91.     and did not work.
  92.     
  93.     - Inherits from LPeriodical to support live clocks.
  94.     - Supports the Tab key for moving focus among the individual
  95.         fields within the clock
  96.     - Broadcasts value message when user changes clock setting
  97.     
  98.     If you have LClock items in existing PPob resources, you
  99.     may want to delete and re-create them. The clock flags
  100.     field could have an invalid value. The "live" flag only
  101.     applies if the "display only" flag is also set. Therefore,
  102.     there is now a "live display only" flag and no "live" flag.
  103.     The value of the flags should never be 2 ("live" without
  104.     "display only").
  105.     
  106.  
  107. LCommander
  108. ----------
  109. * AllowBeTarget()
  110. * AllowDontBeTarget()
  111.     New functions for controlling Target switching. Before changing
  112.     the Target, SwitchTarget() calls AllowDontBeTarget() for the
  113.     current Target, and AllowBeTarget() for the potential new
  114.     Target.
  115.     
  116.     The default behavior is to pass the request up the chain
  117.     of command. This allows Commanders to perform validation
  118.     checks on themselves or their subcommanders. This mechanism
  119.     is much more flexible than the old technique which called
  120.     AllowTargetSwitch() for the first common supercommander
  121.     of the current and new Targets.
  122.     
  123. * AllowSwitchTarget()
  124.     Removed this function. It's replaced by the new AllowBeTarget()
  125.     function, which works similarly. For compatibility there is a
  126.     
  127.         #define AllowSwitchTarget    AllowBeTarget
  128.         
  129.     macro. If you currently override AllowSwitchTarget(), your
  130.     code will work the same if you rename that function to
  131.     AllowBeTarget(). If you don't the macro will effectively
  132.     do the renaming for you.
  133.     
  134. * SwitchTarget()
  135.     Changed to call AllowBeTarget() and AllowDontBeTarget().
  136.     Calls ForceTargetSwitch() to do the actual target switching
  137.  
  138. * ForceTargetSwitch()
  139.     New function. Does the actual target switching. Code was
  140.     formerly in SwitchTarget(). Separating code lets you
  141.     call this function when you don't want to ask permission
  142.     to perform the switch.
  143.     
  144. * TakeChainOffDuty()
  145.     Rewrote to use a do/while loop instead of recursion
  146.     
  147. * ~LCommander()
  148.     When on duty, previous code detached object from its
  149.     SuperCommander, then set the Target to the saved
  150.     SuperCommander. Now code re-attaches object to its
  151.     SuperCommander afterwards. This leaves the command
  152.     chain intact when deleting the SubCommanders, which
  153.     fixes some bugs with objects that needed to pass
  154.     messages up the command chain when being deleted.
  155.     
  156.     Made more robust the code that resets the Target if
  157.     the object is still the Target after deleting
  158.     all its SubCommanders. Before, code tried again
  159.     to set the Target to the saved SuperCommander, and
  160.     then set the SuperCommander to nil. Now code
  161.     sets SuperCommander to nil first, sets the Target
  162.     to the saved SuperCommander, and if the object
  163.     is still the Target after all that, sets the
  164.     sTarget variable explicitly to the SuperCommander.
  165.     
  166.     
  167. LControlImp
  168. -------------
  169. * SetFontStyle()
  170.     Declared ControlFontStyleRec& parameter as const
  171.     
  172. * GetFontSytle()
  173.     Declared as const
  174.     
  175. * SetKeyboardFocusPart()
  176.     New function. Subclasses should override to set the focus
  177.     within multipart Controls.
  178.     
  179. * DoKeyPress()
  180.     Returns control part code instead of a bool
  181.     
  182.  
  183. LControlPane
  184. ------------
  185. * PokeMinValue()
  186.     New function which directly sets the min value without any
  187.     side effects. Needed for cases where the Toolbox overloads
  188.     the min value to hold an option value when creating the
  189.     Control.
  190.  
  191.  
  192. LDragAndDrop
  193. ------------
  194. * HandleDragSendData()
  195. * HandleDragInput()
  196. * HandleDragDrawing()
  197.     Set up and restore A5 world needed by 68K code
  198.  
  199.  
  200. LEventDispatcher
  201. ----------------
  202. * EventSuspend()
  203.     Call LCommander::ForceSwitchTarget() instead of SwitchTarget()
  204.     
  205.     
  206. LGAColorSwatchControl
  207. ---------------------
  208. * DrawSelf()
  209.     Restore localFrame on each pass through the draw loop.
  210.  
  211.  
  212. LGAPopupButtomImp
  213. -----------------
  214. * Removed mUseResMenu and mResType instance variables. They were left
  215.     over from an earlier version, but are unused now.
  216.     
  217. * Init()
  218.     Remove popupMenuResID variable. It is not used in the function.
  219.  
  220.  
  221. LGroupBox
  222. ---------
  223. * DrawText()
  224.     Call EraseRect() before drawing text to erase line which is
  225.     underneath the text
  226.     
  227.     
  228. LKeyScrollAttachment
  229. --------------------
  230. * ExecuteSelf()
  231.     Changed calculation of amount to scroll for page up/down
  232.     to be consistent with that used by LScroller and
  233.     LScrollerView
  234.     
  235.  
  236. LMenuController
  237. ---------------
  238. * SetMenuMinMax()
  239.     Suppress drawing while setting min/max values
  240.  
  241.  
  242. LModelDirector
  243. --------------
  244. * ProcessTokenizedEvent()
  245.     Removed re-declaration of "event" StAEDescriptor within
  246.     for loop in the situation where it is processing token
  247.     by token. "event" is already declared outside the loop
  248.     and is set to a duplicate of the AppleEvent. The re-declaration
  249.     resets the descriptor to typeNull, which is wrong.
  250.     
  251.  
  252. LPopupButton
  253. ------------
  254. * Don't change Menu ID to MENU_Unspecified. Let imps do that if
  255.     necessary.
  256.     
  257.  
  258. LPrintout
  259. ---------
  260. * InitPrinout()
  261.     Removed check for color QuickDraw. Always create a
  262.     color window since PP requires color QD.
  263.     
  264.  
  265. LProgressBar
  266. ------------
  267. * SetIndeterminate()
  268.     Added a new parameter, inStartNow, with a default value
  269.     of true. It specifies whether to start animating immediately
  270.     when changing to an indeterminate progress bar.
  271.  
  272.  
  273. LStdControlImp
  274. --------------
  275. * SetDescriptor()
  276.     Use StFocusAndClipIfHidden instead of calling FocusDraw()
  277.     
  278. * ActivateSelf()
  279. * DeactivateSelf()
  280. * EnableSelf()
  281. * DisableSelf()
  282.     Suppress drawing. Refresh instead.
  283.     
  284.     
  285. LStdPopupMenuImp
  286. ----------------
  287. * Changed strategy for dealing with the MenuHandle. The standard
  288.     (System 7) popup menu CDEF requires a valid MENU resource
  289.     in order to work properly. Previously, this class used
  290.     MENU_Unspecified for the MENU id, which was wrong. Now, it
  291.     uses the user-specified MENU id, but calls GetMenu() before
  292.     creating the control.
  293.     
  294.     To isolate the MenuHandle, the MenuHandle is only installed
  295.     in the Toolbox MenuList for the duration of Control Manager
  296.     calls that need the MenuHandle (Drawing, Tracking, and
  297.     Setting the value). A new StPopupMenuInserter class handles
  298.     inserting and removing the MenuHandle from the MenuList.
  299.  
  300.  
  301. LTableMultiRowSelector
  302. ----------------------
  303. * RemoveCols()
  304. * RemoveRows()
  305.     Fixed calculation of selected cells after deleted items
  306.  
  307.  
  308. LWindow
  309. -------
  310. * CreateWindow()
  311.     Put try/catch block around call to FinishCreate(). If it fails,
  312.     we delete the Window (which is in an inconsistent state)
  313.     and rethrow.
  314.     
  315. * AdjustUserBounds()
  316.     Set user bounds to current Window size and location if the
  317.     Window is not at the standard state. This fixes a bug with
  318.     zooming when dragging a Window that's zoomed out on one
  319.     monitor to a different monitor.
  320.     
  321. * Deactivate()
  322.     Call ForceTargetSwitch() instead of SwitchTarget()
  323.     
  324.     
  325. PowerPlant Resorcerer TMPLs
  326. ---------------------------
  327. * Changed LClock flags field values. "isLive" (value 2) was removed,
  328.     and replaced with "liveDisplayOnly" (value 3), because the
  329.     live option is only valid if displayOnly is also set.
  330.  
  331.  
  332. PowerPlant.r
  333. ------------
  334. * Changed LClock flags field values. "isLive" (value 2) was removed,
  335.     and replaced with "liveDisplayOnly" (value 3), because the
  336.     live option is only valid if displayOnly is also set.
  337.  
  338.     
  339. PP_Macros.h
  340. -----------
  341. * New PP_Obsolete_AllowTargetSwitch symbol. If 1 (ON),
  342.     LCommander.h uses a
  343.     
  344.     #define    AllowTargetSwitch    AllowBeTarget
  345.     
  346.     macro to effectively rename existing AllowTargetSwitch()
  347.     functions to AllowBeTarget(). The default is ON, but
  348.     we recommend that you change you code to rename all
  349.     AllowSwitchTarget() overrides to AllowBeTarget().
  350.     
  351.  
  352. StDialogHandler
  353. ---------------
  354. * InitDialogHandler()
  355.     Delete Undoer if AddAttachment() fails
  356.     
  357.     
  358. StValueChanger
  359. --------------
  360. * StValueChanger()
  361.     Changed inNewValue parameter from
  362.         T inNewValue
  363.     to
  364.         const T& inNewValue
  365.         
  366.     A const reference is more efficient if T is a class, since
  367.     it avoids an extra call to T's copy constructor when pushing
  368.     inNewValue on the stack. There is no extra overhead if T
  369.     is a built-in type such as int.
  370.     
  371.     
  372. UDesktop
  373. --------
  374. * NewDeskWindow()
  375.     Removed check for color QuickDraw. Always create a
  376.     color window since PP requires color QD.
  377.     
  378.     
  379. UFloatingDesktop
  380. ----------------
  381. * NewDeskWindow()
  382.     Removed check for color QuickDraw. Always create a
  383.     color window since PP requires color QD.
  384.     
  385.     
  386. UScreenPort
  387. -----------
  388. * Initialize()
  389. * Dispose()
  390.     Removed checks for color support. Always uses a color port
  391.     since PP requires color QD.